#include "CompileResult.h"
#include "Output/Console.h"
void SErrorInfo::Print() const
{
    for(auto & Message : Messages)
    {
        WH::PrintLine(Message);
    }

    CString Count=  CString(WarningCount) + U" Warnings " + CString(ErrorCount) + U" Errors";
    WH::PrintLine(Count);
}

CString SErrorInfo::ToString() const
{
    CString Result;
    for(auto & Message : Messages)
    {
        Result+=Message+U"\n";
    }

    Result+=CString(WarningCount) + U" Warnings " + CString(ErrorCount) + U" Errors";
    return Result;
}
